home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 36
/
PC Gamer IT CD 36 2-2.iso
/
VIGDEMO
/
data1.cab
/
Assets
/
scripts
/
ammo.e
next >
Wrap
Text File
|
1998-09-21
|
2KB
|
515 lines
int Initialize(string type)
{
global int gGravity = 1;
global int gAmmoValue = 20;
global int gPickupSound = 35;
Reset("dummy");
return 0;
}
int Reset(string dummy)
{
wakeupTime = -1.0;
SetCollidableProperties(thisObject,gGravity,0);
SetStyle(thisObject,2);
SetScale(thisObject,2.0);
return 0;
}
int pickupsound(string sound)
{
gPickupSound = Str2Int(sound);
}
int addammo(string count)
{
gAmmoValue = Str2Int(count);
}
int gravity(string flag)
{
int value;
value = Str2Int(flag);
gGravity = value;
SetCollidableProperties(thisObject,gGravity,0);
}
int Colliders(string dummy)
{
map::iterator ix;
map objInList;
if (IsAuthoritative(thisObject) == 0)
return 0;
objInList = Collisions(thisObject,0,0,0);
for (ix = begin(objInList) ;ix != end(objInList); ++ix)
{
if (AddObjectTo(first(dereference(ix)),thisObject,gAmmoValue) != 0)
{
PlaySound(thisObject,gPickupSound);
Remove(thisObject);
break;
}
}
IgnoreCollision(thisObject);
return 0;
}
int TimedEvent(int input)
{
return 0;
}